1 General Note
We could spend many, many hours talking about tableau and data generally. In fact, there are many classes you can take even at McCourt. As such, these trainings are not designed you make you tableau experts, but rather to give you a general understanding of the interface and abilities to explore.
2 Good Data Practice(s)
We could probably spend hours discussing good data practices, but the biggest points to emphasize in relation to this work are the following:
Naming / labeling: Make everything easily readable - that means, limit spaces (use _ , use the same case, etc.)
- Directories, files, and variable names
Organization: We want to be able to easily access our files in a place we are familiar with. For example, the file path for my GPPR folder looks like this:
3 Data Cleaning and Preliminary Analysis
Don’t use tableau for data cleaning / actual analysis
Why? Honestly, you really can’t. Programs like R, Python, STATA, etc., allow you to create reproducible scripts that both you and others can use to replicate your work! Though Excel doesn’t have this feature, you can manipulate and clean data files, and it is incredibly intuitive, so if you are more comfortable and familiar with Excel, use that!
4 Loading Data into Tableau
For our trainings, we are going to utilize the following data set: Squirrel Data
Want some background on this data set? Check out the user guide and learn more about the Squirrel Census!
Connect your data file - this can be any type of file. However, for our purpose, we will hopefully just be using .csv or .xlsx (Excel) files (with the exception of spatial data which usually is a shape file, geojson, etc.)
5 Exploring the Data
Once you load in your data, this is what you will see:
6 Sheets versus Dashboards
Worksheet: Visualizations of data by dragging and dropping, for example.
Dashboard: Combination of several visualizations that can be arranged for the purpose of sharing, presenting, and grouping similar visualizations based on similar data.
7 Creating a Simple, Static Visualization
Simple and static visualizations may be less fun to interact with than moving or interactive visualizations, but, are still, especially in print, widely utilized and can tell a compelling story.
For this example, we are going to create a bar graph that visualizes the relationship between (2) variables with the goal of visualizing the number of squirrels in each park.
First, create a new sheet by pressing the first icon with a (+) on the bottom toolbar, in the screenshot below, it is the first icon next to “Sheet 1.”
Next, we will drag and drop the two variables! Drag “Squirrel ID” to the columns section and “Park Name” to the rows section. This will create a table of said variables. It shows us what Park each Squirrel ID was found in.
Squirrel ID is collected at the individual level, meaning that there will be one unique park name for each unique squirrel ID. We want to know the count of squirrels in each park, not where each squirrel was found. To do this, we will need to create a calculated field. In the variable list, right click and press “Create Calculated Field…” - you should see the a blank field.
Type COUNT([Squirrel ID]) in the blank field. COUNT is the function, and [Squirrel ID] is the variable name. This tells the program to count the # of squirrel IDs. NOTE: There is no unique tableau language for creating calculated fields, it is rather intuitive to generate these fields similar to Excel. Next, drag the created variable which can be found in the variable list and replace “Squirrel ID” in the column area with this new variable.
Some aesthetic features, this will allow you to make adjustments to your visualizations and adhere to the GPPR style guide:
Bar color: Under “marks” and “color” you can select a new color to change the bar color.
Bar order: Hover “Park Name” in the visualization and press the arrow to select an option to change the order the bars are ranked in.
Column and Row Orientation: In the tableau tool bar, select the icon directly above “columns” with the arrows, this changes the orientation of the columns and rows.
Chart title: Double click the title pane above the visualization to adjust the name and text features of the visualization (font, size, face).
Add alternative text: In your computer tool bar, press “Worksheet” and select “Accessibility.” This will allow you to add alternative text as an accessibility feature for readers who may be using a screen reading software.
Add a caption: In your computer tool bar, press “Worksheet” and select “Show caption.”
8 Creating an Interactive Visualization
Luckily, making our visualization interactive is very straightforward. One way to do this, is through adding filters to our visualization. Filters should be utilized to allow those interacting with our visualization to adjust the data visualized to the data of their choice.
One that might be interesting is to allow readers to select a specific park. Maybe you live near Fort Tryon Park and are interested in the number of squirrels found in the park near your residence! Or, if you want to know where you might walk your dog so that they aren’t distracted by squirrels, you’d only be interested in parks with the least amount of squirrels.
To add a filter, drag and drop the variables of interest from the variable list to the “filter” pane. Tableau generally creates pretty intuitive and usable features based on these filters. You can of course edit them, however, the defaults are useful off the bat - see below.
9 Creating a Moving Graphic
Another way to make your visualization interactive is through adding a page. This makes a motion graphic. For example, the motion graphic created below has a page for each park and its squirrel count. This was created simply by dragging and dropping squirrel counts into the “Page” pane - Tableau does the rest! You can adjust the speed of the graphic as well as how the bars in this case will appear.
10 Creating a Map
Make a new worksheet
You’ll need a geometry feature present in the data set, lucky for us, we have the latitude and longitude points of where the squirrels were found.
Latitude = X (rows)
Longitude = Y (Columns)
Drag the latitude variable to the row option and the longitude variable to the column option
In the “marks” pane, select the “map” to project the points onto a map.
This is a nice map, but, I don’t know about you, but I don’t quite know exactly where these points are located. And, especially since we will want to zoom into New York City, given that these parks are relatively close together, let’s add street names as more intuitive reference points!
To add different background map, select “map” from your computer tool bar, hover over “background maps”, and select the “streets” background.
You can also add a filter to your map by dragging and dropping a variable into the filter pane- this will allow you to select points to show by park name.
11 Creating a dashboard
Putting it all together! - In the lower tool bar, select the second box (next to the button to create a new worksheet). This creates a blank dashboard.
To add a worksheet into the dashboard, drag and drop from the “Sheets” section in the left hand column into the pane! You can adjust and arrange to your heart’s desire. You can adjust the size of the pane by selecting, for example, “Automatic” under size, in the left hand pane.
NOTE, to adhere to the style guide, set your dashboard to 1000 px width to fit a standard screen.
12 Uploading to Tableau Public
To upload your worksheet or dashboard to your Tableau Public Online, press “Save to Tableau Public” located in the upper Tableau tool bar. It may prompt you to sign into your account before saving.
Then, it will automatically open up your browser to the online version of your worksheet / dashboard! (YAY You did it!)
13 The Style Guide (Summarized, a Brief Overview)
Now that you’ve made a visualization, here’s how to adhere to the style guide:
Here’s an example!
Colors - in adherence with “Georgetown’s Visual Identity”
Primary
Georgetown Blue: #041E42
Georgetown Grey: #63666A
Secondary
Pantone 280 (dark blue): #012169
Pantone 293 (light blue): #003DA5
Pantone Cool Gray 4: #BBBCBC
Pantone 7527 (beige): #D6D2C4
Other secondary options
Pantone 306 (bright baby blue): #00B5E2
Pantone 369 (green): #64A70B
Pantone 199 (crimson): #D50032
Pantone 202 (burgundy): #862633
Pantone 1205 (beige-yellow): #F8E08E
Graphs involving American politics or other things with strong psychological color-associations:
Blue: #0028A8
Red: #992233
Green: #338811
Fonts and General Formatting
Title – Georgia, bold, 20pt or higher
Subtitle – Georgia/Tableau Light, regular, 14pt or smaller
Flavortext – Georgia/Tableau Light, regular, 12pt or subtitle size
Graph labels – Georgia/Tableau Light, regular, 12pt or smaller
Graph labels should also be uniform in expression: all numbers should either be rounded to two decimal points, or to whole numbers.
Unit labels should be put in the axis label in parenthesis following the label, not on the axis itself.
Example Axis Label: “Number of Carrots (hundreds)”
Example Axis Label: “Reaction time (seconds)”
Source & byline – Georgia/Tableau Light, italics, 10pt or smaller
Source: [Source Name], [Year] | [Viz Creator Full Name]
Logo(s)
Banner: Position in lower left-hand corner of visualization. Scale to match scale of graph, but typical measurements should be 8 centimeters long by 1.5 centimeters high.
Thumbnail: Use only if there is absolutely no space for the banner logo. Same positioning rules apply.